myApp.controller('home',function ($scope,$serIndex,$state) {
    var ctrl = this;
    ctrl.vm = {
        
    };

    var vm = {
        init : function () {
            $serIndex.getData({
                
            }).then(function (res) {
                if(res.code == 1){
                    console.log('gggg');
                }else {
                    
                }
            });
            console.log(1212);
        },
        det : function () {
            $state.go("details",{}, {reload: true});
        }
    };

    vm.init();
});